@bg-color: #B7D4A9;

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font: bold 20px 'Courier';
}

// 设置主窗口的样式
#main {
    position: relative;
    width: 360px;
    height: 420px;
    background-color: @bg-color;
    margin: 100px auto;
    border: 10px solid black;
    border-radius: 40px;

    display: flex;
    flex-flow: column wrap;
    align-items: center;
    justify-content: space-between;

    // 游戏舞台
    #stage {
        position: relative;
        width: 304px;
        height: 304px;
        border: 2px solid black;
        margin-top: 20px;
        // 设置蛇的样式
        #snake{
            //蛇
            &>div{
                position: absolute;
                width: 10px;
                height: 10px;
                background-color: black;
                border: 1px solid @bg-color;
                &:nth-child(1){
                    background-color: red;
                }
            }
           
        }
         //食物
         &>#food{
            position: absolute;
            width: 10px;
            height: 10px;
            left: 40px;
            top: 100px;
            display: flex;
            flex-flow: row wrap;
            justify-content: space-between;
            align-content: space-between;
            
            &>div{
                width: 4px;
                height: 4px;
                background-color: black;
                transform: rotate(45deg);
                background-color: rgb(93, 93, 93);
            }
        }
    }

    // 记分牌
    #score-panel {
        width: 300px;
        display: flex;
        justify-content: space-between;
        
    }
    // 开始游戏按钮
    #startGame{
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: auto;
        height: 35px;
        line-height: 35px;
        padding: 0px 5px;
        z-index: 999;
    }
}